<?php
class Translate extends AppModel{
    public $useTable  = 'translate';
    public $lang_code = 'vn';
    
    
    public function get_translate()
    {
        $lang_code = $this->lang_code;
        $sql = array('conditions' => array('lang_code =' => $lang_code));
        $translates = $this->find('all', $sql);
        $translate = array();
        foreach($translates as $value)
        {
            $k = $value['Translate']['key_word'];
            $v = $value['Translate']['translate'];
            $translate[$k] = $v;
        }
        return $translate;
    }
}
    